package cn.hellochaos.generator.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author fmy
 * @since 2021-07-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="user")
public class User extends Model<User>{

    private static final long serialVersionUID = 1L;
    /**
     * TableId的注解是必须的，否则MBP会默认主键是id，而不是user_id
     */
    @TableId(value = "user_id", type = IdType.AUTO)
    @ApiModelProperty("用户Id")
    //@JsonIgnore
    private Integer userId;
    @ApiModelProperty("用户名")
    private String username;
    @ApiModelProperty("密码")
    private String password;
    @ApiModelProperty("逻辑删除")
    @JsonIgnore
    private Integer ideletetag;


    @Override
    protected Serializable pkVal() {
        return this.userId;
    }

}
